Optimal. Leaf size=59 \[ -\frac {\left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}-\frac {2 a b \cot (e+f x)}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2789, 3767, 8, 3012, 3770} \[ -\frac {\left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}-\frac {2 a b \cot (e+f x)}{f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2789
Rule 3012
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \csc ^3(e+f x) (a+b \sin (e+f x))^2 \, dx &=(2 a b) \int \csc ^2(e+f x) \, dx+\int \csc ^3(e+f x) \left (a^2+b^2 \sin ^2(e+f x)\right ) \, dx\\ &=-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}+\frac {1}{2} \left (a^2+2 b^2\right ) \int \csc (e+f x) \, dx-\frac {(2 a b) \operatorname {Subst}(\int 1 \, dx,x,\cot (e+f x))}{f}\\ &=-\frac {\left (a^2+2 b^2\right ) \tanh ^{-1}(\cos (e+f x))}{2 f}-\frac {2 a b \cot (e+f x)}{f}-\frac {a^2 \cot (e+f x) \csc (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.47, size = 133, normalized size = 2.25 \[ \frac {a^2 \left (-\csc ^2\left (\frac {1}{2} (e+f x)\right )\right )+a^2 \sec ^2\left (\frac {1}{2} (e+f x)\right )+4 a^2 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-4 a^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )+8 a b \tan \left (\frac {1}{2} (e+f x)\right )-8 a b \cot \left (\frac {1}{2} (e+f x)\right )+8 b^2 \log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-8 b^2 \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{8 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 129, normalized size = 2.19 \[ \frac {8 \, a b \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 2 \, a^{2} \cos \left (f x + e\right ) - {\left ({\left (a^{2} + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a^{2} - 2 \, b^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + {\left ({\left (a^{2} + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} - a^{2} - 2 \, b^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{4 \, {\left (f \cos \left (f x + e\right )^{2} - f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.37, size = 82, normalized size = 1.39 \[ -\frac {a^{2} \cot \left (f x +e \right ) \csc \left (f x +e \right )}{2 f}+\frac {a^{2} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{2 f}-\frac {2 a b \cot \left (f x +e \right )}{f}+\frac {b^{2} \ln \left (\csc \left (f x +e \right )-\cot \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 89, normalized size = 1.51 \[ \frac {a^{2} {\left (\frac {2 \, \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} - 1} - \log \left (\cos \left (f x + e\right ) + 1\right ) + \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - 2 \, b^{2} {\left (\log \left (\cos \left (f x + e\right ) + 1\right ) - \log \left (\cos \left (f x + e\right ) - 1\right )\right )} - \frac {8 \, a b}{\tan \left (f x + e\right )}}{4 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.49, size = 92, normalized size = 1.56 \[ \frac {a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{8\,f}+\frac {\ln \left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (\frac {a^2}{2}+b^2\right )}{f}-\frac {{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {a^2}{8}+b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,a\right )}{f}+\frac {a\,b\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (e + f x \right )}\right )^{2} \csc ^{3}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________